package com.alex.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * null
 * @TableName user
 */
@Data
public class User implements Serializable {
    /**
     * 主键ID
     *
     * @mbg.generated 2021-03-03 20:47:28
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 姓名
     *
     * @mbg.generated 2021-03-03 20:47:28
     */
    private String name;

    /**
     * 年龄
     *
     * @mbg.generated 2021-03-03 20:47:28
     */
    private Integer age;

    /**
     * 邮箱
     *
     * @mbg.generated 2021-03-03 20:47:28
     */
    private String email;

    @TableField(value = "create_time")
    private Date createTime;
    private Date updateTime;

    // 插入操作时更新字段
    @TableField(fill = FieldFill.INSERT)
    private Date createTimeByMbp;

    // INSERT_UPDATE 有插入或者更新操作时触发处理器
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTimeByMbp;

    @Version
    private Long version;

    @TableLogic
    private Integer deleted;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table user
     *
     * @mbg.generated 2021-03-03 20:47:28
     */
    private static final long serialVersionUID = 1L;
}
